import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class validateinput {
	public static void main(String[] args) throws NumberFormatException, IOException
	{
	int a,b,c=0;
	
	BufferedReader object= new BufferedReader (new InputStreamReader(System.in));
	
	while(true)
	{
		try
		{
		  System.out.println("ENTER FIRST side a");
		  a=Integer.parseInt(object.readLine());
		
		  if(a<=0)
		  {
			 System.out.println("enter positive non zero number");	
		  }
		  else
		  {
			System.out.println("first side is " +a);
			break;
		  }
		}
		catch(Exception e)
		{
			System.out.println("enter number only");
		}
	}
		
	while(true)
	{
		try
		{
		  System.out.println("enter second side b");
		  b=Integer.parseInt(object.readLine());
		
		  if(b<=0)
		  {
			  System.out.println("enter positive non zero number");
		  }
		  else
		  {
			 System.out.println("second side is " +b);
			 break;
		  }
		}
		catch(Exception e)
		{
			System.out.println("enter number only");
		}
	}
	
	while(true)
	{
		try
		{
		  System.out.println("enter third side c");
		  c=Integer.parseInt(object.readLine());
		
		if(c<=0)
		{
			System.out.println("enter positive non zero number");
		}
		
		else
		{
			System.out.println("third side is " +c);
			break;
		}
		}
		catch(Exception e)
		{
			System.out.println("enter number only");
		}
	}
	
	   if((a+b) <c || (b+c)<a || (a+c)<b)
		{
			System.out.println("these are not valid sides of a triangle..please enter correct sides");
			        
			while(true)
			{
				try
				{
				  System.out.println("enter first side a");
				  a=Integer.parseInt(object.readLine());
				
				 if(a<=0)
				 {
					System.out.println("enter positive non zero number");	
				 }
				else
				{
					System.out.println("first side is " +a);
					break;
				}
				}
				catch(Exception e)
				{
					System.out.println("enter number only");
				}
			}
				
			while(true)
			{
				try
				{
				  System.out.println("enter second side b");
				  b=Integer.parseInt(object.readLine());
				
				if(b<=0)
				{
					System.out.println("enter positive non zero number");	
				}
				else
				{
					System.out.println("second side is " +b);
					break;
				}
				}
				catch(Exception e)
				{
					System.out.println("enter number only");
				}
			}
			while(true)
			{
				try
				{
				System.out.println("enter third side c");
				c=Integer.parseInt(object.readLine());
				
				if(c<=0)
				{
					System.out.println("enter positive non zero number");
					
				}
				else
				{
					System.out.println("third side is " +c);
					break;
				}
				}
				catch(Exception e)
				{
					System.out.println("enter number only");
				}
			}
		
		}//end of if checking valid sides
		
			if((a==b) && (b==c) && (a==c))
			{
				System.out.println("triangle is equilateral");
			}

			if (a==b && b!=c ||b==c && a!=c || a==c && a!=b )
			{
				System.out.println("triangle is isosceles");
				
			}
			
			if(a!=b && b!=c && a!=c)
			{
				System.out.println("triangle is scalene");
				
			}
			
			if(a*a + b*b == c*c)
			{
				System.out.println("traingle is right angled");
			}
			
			if(a>b && a>c )
			{
				int g=a;
			
			if ((b*b + c*c)==g*g)
			{
				System.out.println("triangle is right angled");
				
			}
		
			
		}
}

}
